/*
 * @Author: w
 * @Date: 2022-03-01 16:17:05
 * @Description: 剑指 Offer 27. 二叉树的镜像
 */

// 树的遍历，可以考虑为对象的深拷贝

/**
 * Definition for a binary tree node.
 * function TreeNode(val) {
 *     this.val = val;
 *     this.left = this.right = null;
 * }
 */
/**
 * @param {TreeNode} root
 * @return {TreeNode}
 */
var mirrorTree = function (root) {
  return JSON.parse(JSON.stringify(root));
};
